package javaAPI.StringBuilderTest;

public class StringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder("abc");
        sb.append(1);
        sb.reverse();
        System.out.println(sb);
        System.out.println("=================");
        sb.append("aaaa");
        sb.append("bbbb");
        sb.append("eeee");
        sb.append("cccc");
        sb.append("dddd");
        //链式编程：sb.ppend().append().append();...
        String str=sb.toString();//将其重新变为字符串
        System.out.println(str);
    }
}
